<?php
class LabErrorCode {
	//convention [modulecode 3 characters][error code 3 digits]
	const ASSIGNMENT_COULD_NOT_DELETE = "LAB_002";
	const ASSIGNMENT_DELETING_FAIL = "LAB_003";
	const ASSIGNMENT_CREATING_FAIL = "LAB_004";
	const ASSIGNMENT_FINISHING_FAIL = "LAB_006";
	const ASSIGNMENT_ALREADY_START = "LAB_007";
	const QUEUE_COULD_NOT_CANCEL = "LAB_005";
	const SAVE_FAIL = "LAB_008";

	public static function getErrorMess($errCode, $input1=null,$input2=null,$input3=null,$input4 = null) {
		switch ($errCode) {
			case LabErrorCode::ASSIGNMENT_COULD_NOT_DELETE:
				return L10nHelper::_("Could not delete a laboratory assignment is in-process or done");
			case LabErrorCode::ASSIGNMENT_CREATING_FAIL:
				return L10nHelper::_("Creating laboratory assignment fail");
			case LabErrorCode::ASSIGNMENT_DELETING_FAIL:
				return L10nHelper::_("Deleting laboratory assignment fail");
			case LabErrorCode::QUEUE_COULD_NOT_CANCEL:
				return L10nHelper::_("Could not cancel the assignment already finished or was inputted result");
			case LabErrorCode::ASSIGNMENT_FINISHING_FAIL:
                return L10nHelper::_("Finishing laboratory assignment fail");
            case LabErrorCode::ASSIGNMENT_ALREADY_START:
                return L10nHelper::_("This laboratory assignment already started");
            case LabErrorCode::SAVE_FAIL:
                return L10nHelper::_("Save fail");
			default:
				;
				break;
		}
			
	}
}
?>